package com.atguigu.mybatisplus;

import com.alibaba.fastjson.JSON;
import com.atguigu.mybatisplus.entity.CategoryEntity;
import com.atguigu.mybatisplus.mapper.CategoryMapper;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author study
 * @version 1.0
 * @date 2021/4/27 17:37
 */
@SpringBootTest
public class MapperCategory {
    @Resource
    private CategoryMapper categoryMapper;

    @Test
    public void add() {
        final List<CategoryEntity> categoryEntities = categoryMapper.selectList(null);
        final String s = JSON.toJSONString(categoryEntities);
        System.out.println(s);
    }
}
